using System;
using System.Data;
using System.Data.SqlClient;

namespace DataAccessProvider
{
	/// <summary>
	/// The SQLDataAccessLayer contains the data access layer for Microsoft SQL Server. 
	/// This class implements the abstract methods in the DataAccessLayerBaseClass class.
	/// </summary>
    public class SqlDataAccessLayer : DataProviderBaseClass
	{
        private SqlConnection sqlConnection;

		// Provide class constructors
		public SqlDataAccessLayer() {}
		public SqlDataAccessLayer(string connectionString) { this.ConnectionString = connectionString;}

        public SqlDataAccessLayer(SqlConnection sqlConnection)
        {
            // TODO: Complete member initialization
            this.sqlConnection = sqlConnection;
        }       

		// DataAccessLayerBaseClass Members
		internal override IDbConnection GetDataProviderConnection()
		{
			return new SqlConnection();
		}
		internal override IDbCommand GeDataProviderCommand()
		{
			return new SqlCommand();
		}

		internal override IDbDataAdapter GetDataProviderDataAdapter()
		{
			return new SqlDataAdapter();            
		}        
	}
}
